import cv2
import numpy as np
img=cv2.imread("images/a.jpg")
print(img.shape)#打印属性
#                    宽，高                     面积
dst1=cv2.resize(img,(50,20),interpolation=cv2.INTER_AREA)
#                        倍数     宽    高
dst=cv2.resize(img,None,None,fx=1.5,fy=0.5,interpolation=cv2.INTER_LINEAR)
cv2.imshow("img",img)
cv2.imshow("dst1",dst1)
cv2.imshow("dst",dst)
cv2.waitKey(0)